package com.qidianit.mes.pro.service;

import com.github.pagehelper.PageInfo;
import com.qidianit.mes.pojo.Result;
import com.qidianit.mes.pojo.pro.Workflow;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @Author: YKYB
 * @Date: 2025/9/18 18:33
 * @Description:
 */
@Transactional
public interface WorkflowService {

    /**
     * 根据物料编号查询工艺流程，同时查询出这个工艺的所有工序列表
     *
     * @param code
     * @return
     */
    Result<List<Workflow>> selectByMaterialCode(String code);

    /**
     * 多条件查询工艺
     *
     * @param workFlow
     * @return
     */
    Result<PageInfo<Workflow>> selectList(Workflow workFlow, Integer pageNum, Integer size);

    /**
     * @param code
     * @return
     */
    Result<Workflow> selectByCode(String code);

    /**
     * @param workFlow
     * @return
     */
    Result<Workflow> saveWorkflow(Workflow workFlow);

    /**
     * @param workFlow
     * @return
     */
    Result updateById(Workflow workFlow);

    /**
     * @param id
     * @return
     */
    Result deleteById(Long id);

    /**
     * @param ids
     * @return
     */
    Result batchDeleted(Long[] ids);


}
